package com.nb.ds;

import com.nb.ds.datasource.DsConstant;
import com.nb.ds.datasource.DynamicDataSource;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.Primary;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import javax.sql.DataSource;
import java.util.HashMap;
import java.util.Map;

@EnableTransactionManagement
@MapperScan("com.nb.ds.mapper")
@Slf4j
@SpringBootApplication
public class NbDynamicDatasourceApplication {

    public static void main(String[] args) {
        SpringApplication.run(NbDynamicDatasourceApplication.class, args);
        log.info("===========DynamicDatasource Started===============");
    }


}
